import { stringify } from 'qs';
import request from '@/utils/request';

export async function queryModelClass(params) {
  return request(`/api/productmodelclasses?${stringify(params)}`);
}
export async function queryModelClassTree() {
  return request(`/api/productmodelclasses/tree`);
}
export async function add(params) {
  return request('/api/productmodelclasses', {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function edit(params) {
  return request('/api/productmodelclasses', {
    method: 'PUT',
    body: {
      ...params,
    },
  });
}
export async function del(params) {
  return request(`/api/productmodelclasses/${params}`, {
    method: 'DELETE',
  });
}
export async function qryById(params) {
  return request(`/api/productmodelclasses/${params}`, {
    method: 'GET',
  });
}
